package BusLib;


import java.io.Serializable;
import java.util.*;

public class Station implements Serializable {

    int id_;
    String name_;
    Coordinates coordinates_;
    String streetName_;
    ArrayList<Route> routes_;


    /*
     * Constructori.
     */
   public Station(){
        id_=0;
        name_=null;
        coordinates_=null;
        streetName_=null;
        routes_=new ArrayList<Route>();
    }

    public Station(int id, String name,String street,Coordinates coordinates){
        id_=id;
        name_=name;
        coordinates_=coordinates;
        streetName_=street;
        routes_=new ArrayList<Route>();
    }

    /*
     * Metode.
     */

    public int Id(){ return id_;}
    public void SetId( int id ){ id_ = id;}
    public String Name(){ return name_;}
    public void SetName( String name){ name_ = name;}
    public String StreetName(){ return streetName_;}
    public void SetStreetName(String street){ streetName_ = street;}
    public Coordinates Coordinates(){ return coordinates_;}
    public void SetCoordinates( Coordinates coordinates){ coordinates_ = coordinates;}


        // Metode ce acceseaza lista de rute.
    public List<Route> Routes() { return routes_; }
    public void AddRoute(Route route) { routes_.add(route);  }
    public void ContainsRoute(Route route) { routes_.contains(route); }
    public void DeleteRoute(Route route) { routes_.remove(route); }
    public void ClearRoutes(){ routes_.clear(); }


}
